package top.wilbert.collegelink.forum.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import top.wilbert.collegelink.common.utils.PageUtils;
import top.wilbert.collegelink.forum.entity.CommentEntity;
import top.wilbert.collegelink.forum.vo.CommentCreateVo;
import top.wilbert.collegelink.forum.vo.CommentResponseVo;

import java.util.Map;

/**
 * 
 *
 * @author Augus
 * @email 2531496343@qq.com
 * @date 2023-02-28 20:44:25
 */
public interface CommentService extends IService<CommentEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void comment(CommentCreateVo commentCreateVo);

    PageUtils listLevel1ByTalkId(IPage<CommentResponseVo> page, Long targetId, Integer targetType, Long userId);

    PageUtils listLevel2ByTalkId(IPage<CommentResponseVo> page, Long pid, Long userId);

    void addLikeCount(Long commentId);

    void reduceLikeCount(Long commentId);

    void reduceCommentCount(Long commentId);
}

